function HAZ_datainput

datafig=figure( ...
   'Visible','on', ...
   'Name','Data Input', ...
   'Units','Normalized',...
   'Tag','HAZ_DATA',...
   'NumberTitle','off');

uicontrol( ...
        'Style','text', ...
        'Units','normalized', ...
        'FontUnits','normalized',...
        'Position',[.4,.85,.2,.1], ...
        'BackgroundColor',[0.8 0.8 0.8], ...
        'ForegroundColor',[0 0 0], ...
        'FontSize',0.5,...
        'String','Data Input');

uicontrol( ...
        'Style','text', ...
        'Units','normalized', ...
        'FontUnits','normalized',...
        'Position',[.1,.75,.5,.1], ...
        'HorizontalAlignment','left',...
        'BackgroundColor',[0.8 0.8 0.8], ...
        'ForegroundColor',[0 0 0], ...
        'FontSize',0.4,...
        'String','Select a file to load (the variables has to be named X and d):');

% The LAOD button
LoadStr='uiload;delete(gcf);if exist(''X'',''var''), if length(X)>0, mf=findobj(''Tag'',''HAZ_MAIN'');udata=get(mf,''UserData'');udata.X=X;minX=min(X);maxX=max(X);DX=maxX-minX;xx=linspace(minX-0.1*DX,maxX+0.1*DX,201);K=udata.K;h=h_Fms(X,K);f_est=K_dest(xx,X,h,K);udata.xx=xx;udata.h=h;udata.f_est=f_est;set(mf,''UserData'',udata);HAZ_datadraw;end,end';
uicontrol( ...
        'Style','push', ...
        'Units','normalized', ...
        'FontUnits','normalized',...
        'Position',[0.6,.775,.2,0.07], ...
        'String','Load', ...
        'Callback',LoadStr);

